/*******************************************************************************
 * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
 * Distributed under license by Red Hat, Inc. All rights reserved.
 * This program is made available under the terms of the
 * Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Exadel, Inc. and Red Hat, Inc. - initial API and implementation
 ******************************************************************************/ 
package demo;

import javax.annotation.Resource;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
//import javax.transaction.HeuristicMixedException;
//import javax.transaction.HeuristicRollbackException;
//import javax.transaction.NotSupportedException;
//import javax.transaction.RollbackException;
//import javax.transaction.SystemException;
//import javax.transaction.UserTransaction;
import net.inteidee.persistenza.Utente;

import org.postgresql.Driver;


/**
 * Created by JBoss Tools
 */
public class Person {
	private String name;
	private String surname;
	
	private Utente utente;
	  
	//@Resource private UserTransaction utx;

	//@PersistenceContext(unitName="Jaas")
	//EntityManager em ;
	
	public Person() {
		
		utente = new Utente();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}
	
//	public void saveUtente() throws NotSupportedException, SystemException, SecurityException, IllegalStateException, RollbackException, HeuristicMixedException, HeuristicRollbackException{
//		
//    	utx.begin();
//    	em.persist(utente);
//        utx.commit();
//	    //em.getTransaction().commit();
//	   
//	}
	
	public void saveUtente(){
		System.out.println("ok");
	}
//
//	public Utente getUtente() {
//		return utente;
//	}
//
//	public void setUtente(Utente utente) {
//		this.utente = utente;
//	}
	
	
}